<?php namespace Admin\Controller;


class Controller extends \Hdphp\Controller\Controller{
	
	public function __construct()
	{
		if(!Q('session.id'))
		{
			go('Login/login');
		}
		$set = Db::table('set') -> where('username', $_SESSION['username']) -> first();
		//查无此帐号
		if (!$set) {
			echo '';
			exit ;
		}
		//获取access_token
		Weixin::appID($set['appid']) -> appsecret($set['appsecret']) -> getAccessToken();
		parent::__construct();
	}
	
	
}











